﻿using System;
using System.Collections.Generic;
using System.Drawing;

namespace Firefly.Data {
    public class WorldConfig {
        public string WorldName { get; set; }
        public string ServerAddress { get; set; }
        public Int32 ServerPort { get; set; }
        public string BackupAddress { get; set; }
        public Int32 BackupPort { get; set; }
        public string ProxyAddress { get; set; }
        public Int32 ProxyPort { get; set; }
        public bool UsingProxy { get; set; }
        public MSSPStats MSSP { get; private set; }

        // Output settings
        public Font OutputFont { get; set; }
        public Font InputFont { get; set; }
        public Color OutputWindowColor { get; set; }
        public Color InputWindowColor { get; set; }
        public Color InputFontColor { get; set; }
        
        // Character Data
        public List<Character> Characters { get; set; }

        // Editor Specific Data
        public bool ChangesMade { get; set; }

        public WorldConfig() {
            this.Characters = new List<Character>();
            this.MSSP = new MSSPStats();
            LoadDefaultWorldConfiguration();
        }

        private void LoadDefaultWorldConfiguration() {
            OutputFont = new Font("Courier New", 11.1f, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            InputFont = new Font("Courier New", 11.1f, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            OutputWindowColor = Color.Black;
            InputWindowColor = Color.Black;
            InputFontColor = Color.White;
        }
    }

    public struct MSSPStats {
        public string Hostname { get; set; }
        public Int32 Port { get; set; }
        public string Codebase { get; set; }
        public string Contact { get; set; }
        public string Created { get; set; }
        public System.Drawing.Icon Icon { get; set; }
        public string IP { get; set; }
        public string MinimumAge { get; set; }
        public string Website { get; set; }
        public string Family { get; set; }
        public string Genre { get; set; }
        public string Gameplay { get; set; }
        public string Status { get; set; }
        public string GameSystem { get; set; }
        public string SubGenre { get; set; }
        public bool ANSI { get; set; }
        public bool UTF8 { get; set; }
    }
}
